<?php
function myCoroutine() {
    for ($i = 1; $i <= 3; $i++) {
        yield file_get_contents("http://localhost/demo.php");
    }
}

$coroutine = myCoroutine();
foreach ($coroutine as $value) {
    echo $value . PHP_EOL;
}
